<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'upload-form',
	'enableAjaxValidation'=>false,
)); ?>

	<div class="row">
		<?php echo $form->labelEx($model, 'data'); ?>
		<?php echo $form->textField($model,'data', array('disabled'=>'true', 'readOnly'=>'true')); ?>
		<?php echo $form->error($model,'data'); ?>
	</div>
	
	<?php $this->widget('zii.widgets.grid.CGridView', array(
		'id'=>'download-grid',
		'dataProvider'=>$model->buscarArquivos(),
		'columns'=>array(
			'nome',
			'categoria',
			'tamanho',
			array(
	   			'class'=>'CLinkColumn',
	   			'header'=>'Download',
				'label'=>'Download',
	   			'urlExpression'=>'Yii::app()->controller->createUrl("site/downloadFile/$data->id_arquivo")',
	   			'headerHtmlOptions' => array('width'=>'80px',),
			),
			array(
				'class'=>'CButtonColumn',
				'header'=>'Opções',
				'buttons'=>array(
					'update'=>array('visible'=>'',),
					'view'=>array('visible'=>'',),
				),
			),
		),
	)); ?>

<?php $this->endWidget(); ?>

</div><!-- form -->